<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('read_samples', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('company_id')->default(0)->index();
            $table->unsignedBigInteger('project_id')->default(0)->index();
            $table->unsignedBigInteger('admin_id')->default(0)->index();
            $table->string('number')->nullable()->comment('材料编号');
            $table->string('name')->nullable()->comment('材料名称');
            $table->string('part')->nullable()->comment('使用部位');
            $table->string('brand')->nullable()->comment('品牌');
            $table->string('surspecsface')->nullable()->comment('规格型号');
            $table->string('sample_photo')->nullable()->comment('甲方/设计提供样板照片');
            $table->string('unit')->nullable()->comment('单位');
            $table->string('quantity')->nullable()->comment('数量');
            $table->string('send_photo')->nullable()->comment('材料送样照片');
            $table->string('contact')->nullable()->comment('联系方式');
            $table->string('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('read_samples');
    }
};
